package com.chang.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chang.common.to.mq.SeckillOrderTo;
import com.chang.common.utils.PageUtils;
import com.chang.order.entity.OrderEntity;
import com.chang.order.vo.*;

import java.util.Map;

/**
 * 订单
 *
 * @author chang
 * @email 2045807586@qq.com
 * @date 2024-01-03 15:47:32
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    // 返回订单确认页需要用到的数据
    OrderConfirmVo confirmOrder();

    // 提交订单
    SubmitOrderResponseVo submitOrder(OrderSubmitVo orderSubmitVo);

    // 根据订单sn查询订单状态
    Integer getOrderStatusByOrderSn(String orderSn);

    // 延迟队列超时关闭订单
    void closeOrder(OrderEntity orderEntity);

    // 根据订单sn获取订单支付信息
    PayVo getPayByOrderSn(String orderSn);

    // 分页查询当前登录用户所有订单信息
    PageUtils queryPageWithItem(Map<String, Object> params);

    // 处理支付宝的支付结果
    String handlePayResult(PayAsyncVo payAsyncVo);

    void creatSeckillOrder(SeckillOrderTo seckillOrderTo);
}

